/**
 * @fileoverview Tests for no-with rule.
 * @author Nicholas C. Zakas
 */

 "use strict";

 //------------------------------------------------------------------------------
 // Requirements
 //------------------------------------------------------------------------------
 
 var rule = require("../../../lib/rules/catch-clause-empty"),
     { RuleTester } = require('eslint');
 
 //------------------------------------------------------------------------------
 // Tests
 //------------------------------------------------------------------------------
 
 var ruleTester = new RuleTester();
 ruleTester.run("cacth-clause-empty-test", rule, {
     valid: [
        "try {\
          bar()\
        } catch (error) {\
          console.log(error.message)\
        }"
     ],
     invalid: [
         {
            code: `try {
              doSomethingThatMightThrow();
            } catch (e) {}`,
            errors: [{ message: "you must provide a interactive action to user in `TryStatement`"}]
         }
     ]
 });